import {request} from '@/apis';
import {addPrefix} from '@/utils/helper';
// @ts-ignore
import {type EnvironmentCreditRateParams} from './types';

const prefixUrl = '/ep-query';

const Api = {
  /** 环责险企业列表 */
  GET_INSURANCE: '/getEnvironmentalInsurance',
  /** 环责险企所属类别-纳入企业 */
  GET_CLASS_TYPE: '/screen/environmentalInsuranceCompanyType',
  /** 环责险企所属类别-投保企业 */
  GET_CLASS_TYPE2: '/screen/environmentalInsurancePolicyCompanyType',
  /** 环责险年度筛选 */
  GET_TAG_YEAR: '/v1/insurance/tagYear',
  /** 热门搜索 */
  area: '/screen/area',
  industry: '/screen/industry',
  tagYear: '/screen/tagYear',
  tagType: '/screen/tagType',
  getHbSubject: '/getHbSubject'
};

addPrefix(Api, prefixUrl);

// @ts-ignore
export * from './types';

/** 获取地区 */
export const getArea = () => request.get({url: Api.area});

/** 获取行业 */
export const getIndustry = () => request.get({url: Api.industry});


/** 环责险列表获取接口 */
export const getInsurance = (params) => request.get({url: Api.GET_INSURANCE, params});

/** 环责险纳入企业筛选项所属类别接口 */
export const getClassType = () => request.get({url: Api.GET_CLASS_TYPE});

/** 环责险投保企业筛选项所属类别接口 */
export const getClassType2 = () => request.get({url: Api.GET_CLASS_TYPE2});

/** 环责险年度筛选接口 */
export const getInsuranceTagYear = (params) => request.get({url: Api.GET_TAG_YEAR, params});


